Conversation
Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
|
@copilot When there is already active ai coding session inside a repo, in some case, I opened a different file in the repo, C-c a z or C-c a cannot find the already opened ai coding session, will this fix resolve the issue? |
Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
Addressed in 5075132. Newly opened files in the same repo now reuse the current remembered AI session by default, so |
|
@copilot Will the code be able to handle the case for multiple active ai coding sessions? At that case, opened a new file, C-c a z or C-c a should ask user to choose session it should attach to. |
Co-authored-by: tninja <714625+tninja@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
Yes — that case is covered by af5b77b. For a newly opened file with multiple active sessions in the same repo, |
|
I'll test this branch for a while before merging it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af5b77b030
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (effective-force-prompt | ||
| (or force-prompt | ||
| attached-missing)) |
There was a problem hiding this comment.
Force selection for first file binding with multiple sessions
Dropping needs-initial-file-selection from effective-force-prompt means a newly opened file with no existing attachment now silently reuses whatever repo session is remembered. In a repo with multiple active sessions, that remembered buffer can belong to an unrelated task, so the first send/switch for the file can bind it to the wrong session and persist that mapping without any chooser prompt. The prior logic explicitly forced a prompt for this first-time file association, so this is a behavior regression introduced here.
Useful? React with 👍 / 👎.
Single-file session attachment improved multi-session UX, but in a rare case
C-c a zcould no longer find the associated AI session. The failure mode was a live attached session being treated as missing when the current working directory no longer matched the session buffer’s directory lookup. Follow-up feedback also exposed a related same-repo case: when a repo already had an active AI session, opening a different file could still force a fresh selection instead of reusing the current session.Root cause
working-dirsession scan.Behavior change
ai-code-backends-infra--attached-file-sessionnow treats an attached session as valid when:Regression coverage
working-dirdiffers from the session’s original directory.Effect on users
C-c a znow continues to reopen the remembered session for a file in cases where the attachment is still correct but directory matching is no longer exact.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.